Messages

The basic format of the Unicore message is:

image-20240509114054021

All messages include the following parts:

  • Message header. It starts with ‘$’ (0x24).
  • Data field. It follows a delimiter ',' (0x2C) and consists of a number of parameters or data. The adjacent data are also separated by the delimiter ',' .
  • Checksum. It is separated from the previous data by ‘*' (0x2A).
  • Termination characters. The input message ends with ‘\r’ (0x0D) or ‘\n' (0x0A) or any combination of the two. The output message ends with ‘\r\n'.

The termination characters are omitted in Unicore Messages, as shown in each table of message introduction.

Message header and parameters, as well as letters in the checksum are case-sensitive, and the command echoes according to your inputs.

The total length of each message cannot exceed 128 bytes.

Some parameters of the commands can be omitted (marked as optional in the command description), which means that those parameters can be empty and there is no character between the two delimiters ‘,,’ or ‘,*’. If there is no special instruction, the parameter is ignored and the option it controls remains unchanged.

Most of the message headers can be used for both input commands and output messages. As the input, it sets parameters or queries the current configuration; as the output, it outputs the receiver information or configuration.

Checksum

The two characters after ‘*' (0x2A) in the message are the checksum, which is the XOR of all characters (excluding ‘$' and ‘*') from ‘$' to ‘*' in hexadecimal.

The checksum in the input command is optional. If the input message contains ‘*' followed by two characters, the checksum is examined. If it is wrong, the command is not executed, and the receiver outputs the $FAIL message, in which a checksum error appears. If the message does not contain a checksum, the command is executed directly.

The output message always contains a checksum.

results matching ""

    No results matching ""